<script setup>
  const count = 100
  const sayHi = () => {
    console.log('Hello Vue3 !')
  }
  
  // 只有通过 defineExpose 对外暴露，父组件才能获取
  defineExpose({
    count,
    sayHi
  })
</script>

<template>
  <p>测试组件</p>
</template>

<style scoped>

</style>